﻿<%@ Page Language="C#" %>

<%@ Import Namespace="wojilu" %>
<%@ Import Namespace="wojilu.View" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Domain" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Service" %>

<%PowerGroup modelpowergroup = v.data("powergroup") as PowerGroup; %>
<%var bllPowerGroupService = new PowerGroupService(); %>
<%List<site> list = v.data("list") as List<site>; %>

<%if (list.Count > 0){ %>
<% foreach (site row in list) { %>
<div class="infolist" onselectstart="return false;" title="<%=row.sitename %>" <%if (bllPowerGroupService.powercheck("system", "siteedit", modelpowergroup)) { %> ondblclick="javascript:parent.onbotton('_{sitemain_edit_title}','<%=link.to(new wojilu.Web.Controller.Admin.Qycms.AdvertController().AdvertAdd, row.Id) %>?freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),false);" <%} %>>
	<table border="0" style="border-collapse:collapse" width="100%" bordercolor="#FFFFFF">
		<tr>
			<td width="5%"><input type="checkbox" name="selectinfoid" value="<%=row.Id %>"></td>
			<td width="10%">
				<input type="hidden" name="infoid" id="infoid" value="<%=row.Id %>" />
				<input type="text" name="pid" size="3" value="<%=row.pid %>" class="infoInput"  onclick="if(this.value=='<%=row.pid%>'){this.value = '';}else {this.select();}" onblur="if(this.value ==''){this.value ='<%=row.pid %>';}" />
			</td>
			<td width="10%"><%=row.Id %></td>
			<td width="40%"><%=row.sitename %></td>
			<td width="35%" id="infotype">
				<table>
					<tr>
                        <%if (bllPowerGroupService.powercheck("system", "siteedit", modelpowergroup)) { %>
						<td><a class="setedit3" onclick="javascript:parent.onbotton('_{sitemain_edit_title}','<%=link.to(new wojilu.Web.Controller.Admin.Qycms.SiteController().SiteEdit, row.Id) %>?freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),false);" href="#body" title="_{sitemain_edit_title}" hidefocus="true">_{sitemain_edit_title}</a></td>
						<td class="padding-left3"><a class="setedit3" target="_blank" href="<%=row.link %>" title="_{sitemain_call_title}" hidefocus="true">_{sitemain_call_title}</a></td>
						<%} %>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</div>
<%} %>
<%}else{%>
<div class="infolist">
	<table border="0" style="border-collapse:collapse" width="100%" bordercolor="#FFFFFF">
		<tr>
			<td align="center">_{list_nothing_title}</td>
		</tr>
	</table>
</div>
<%} %>